//
//  faceToFaceViewController.m
//  One Construction
//
//  Created by apple on 2019/9/7.
//  Copyright © 2019 apple. All rights reserved.
//

#import "faceToFaceViewController.h"
#import "faceTableViewCell.h"

@interface faceToFaceViewController ()
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)NSMutableArray *DataArr;;
@property(nonatomic,strong)UIButton *mainBtn;

@end

@implementation faceToFaceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"我的面授课";
    [self getAllDataOfNet];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
//
// return  self.DataArr.count;
//
//}

- (void)getAllDataOfNet{
     __weak __typeof__(self)WeakSelf = self;
      NSString *drivice_id  = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
    NSDictionary *dic = @{
                          @"user_id":[User sharedUUser].user_id,
                           @"drivice_id":drivice_id,
                           @"ms_status":@"",
                           @"page":@"",
                          };
    [CZNetWork post:@"https://i.zhongjianedu.com/ios.php/104/qrcode/mymskc" params:dic success:^(id success) {
        
//        NSLog(@"success:%@",success);
        [WeakSelf.DataArr removeAllObjects];
//        NSString *str = success[@"event"];
//        if ([str isEqualToString:@"101"]) {
            [ProgressHUD showText:@"暂没有数据哦~" icon:[UIImage imageNamed:@""] mode:MBProgressHUDModeText onView:self.view duration:2.0];
//        }
//        else if ([str isEqualToString:@"100"]){
//            NSArray *arr = success[@"list"];
//            for (int i =0; i<arr.count; i++) {
//                [self.DataArr addObject:arr[i]];
//            }
//
//            [WeakSelf.tableView reloadData];
//        }
        
    } failure:^(NSError *error) {
        
    }];
    
    
}
-(NSMutableArray *)DataArr{
    if (!_DataArr) {
        _DataArr = [[NSMutableArray alloc]init];
    }
    
    return _DataArr;
}


@end
